import request from '@/utils/request'

export function getList(query) {
  return request({
    url: '/operate/list',
    method: 'get',
    params: query
  })
}

export function getInfo(id) {
  return request({
    url: '/operate/' + id,
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: '/operate',
    method: 'post',
    data
  })
}

export function addCRUD(moduleId) {
  return request({
    url: '/operate/addCRUD/' + moduleId,
    method: 'post'
  })
}

export function update(data) {
  return request({
    url: '/operate',
    method: 'put',
    data
  })
}

export function remove(id) {
  return request({
    url: '/operate/' + id,
    method: 'delete'
  })
}
